Oscillator circuits are used with digital electronic circuits (e.g., microcontrollers and microprocessors) to generate a clock signal for synchronizing, pacing and coordinating the operations of the digital electronic circuit. One common form of an oscillator circuit is a relaxation oscillator circuit. A relaxation oscillator circuit uses current into a capacitor to create a capacitor voltage. The capacitor voltage is a ramp voltage. A comparator of the relaxation oscillator circuit compares a known reference voltage against the capacitor voltage. When the capacitor voltage reaches the reference voltage, the comparator switches states, creating a clock signal.
Microcontrollers are placed in a vast array of electronic devices, such as computer systems, cellular telephones and palmtop computer systems. A growing concern of users of electronic devices, particularly portable devices such as cellular telephones and palmtop computer systems, is the ability of the devices to conserve power. To conserve power, microcontrollers are often placed in a sleep mode. However, it is necessary to maintain a clock signal in a digital electronic circuit to time a wake-up event for the microcontrollers to exit the sleep mode.
Currently, when microcontrollers enter into a sleep mode, the microcontroller must either switch to a different oscillator circuit that is optimized for low power or continuously run the standard oscillator circuit. Requiring the circuit to switch to a different oscillator circuit optimized for low power requires an extra oscillator circuit, adding to the cost of the digital electronic circuit and consuming space on the microcontroller. Alternatively, running the standard oscillator circuit while in sleep mode continues to drain power, and is thus less effective in conserving power.
As described above, relaxation oscillator circuits supply current into a capacitor to create a capacitor voltage. It is essential to the effective operation of a relaxation oscillator circuit to have capacitors of the proper specifications for creating the capacitor voltage. If the capacitors are not to the proper specifications, the clock signal generated by the relaxation oscillator circuit may not function properly.
Capacitors often vary due to the fabrication process. In current relaxation oscillator circuits, it is not possible to adjust the current charging the capacitors to account for process variation. In order to ensure that capacitors are to the proper specifications, all capacitors must be tested and those that are not to specification are discarded, resulting in wasted parts. Alternatively, a relaxation oscillator circuit may be adapted to have external capacitors. However, this is not an option for a microcontroller, as there is no way to provide an external capacitor for the oscillator circuit.